package kayao.server.network.message;

import kayao.common.KayaoValues;
import kayao.common.NetworkUtils;

public class NotYourKingMessage extends Message {

	public NotYourKingMessage(String targetAddress, int retries,
			int timeoutLength, int priority) {
		super(targetAddress, retries, timeoutLength, priority);
		createPacketData();
	}

	@Override
	public void createPacketData() {
		mSendData=new byte[9];
		byte []value=NetworkUtils.int32ToByte(KayaoValues.MAGIC_NUMBER);
		System.arraycopy(value, 0, mSendData, 0, 4);
		mSendData[4]=KayaoValues.SUSCRIPTION_REQUEST_NEGATIVE_ANSWER;
		NetworkUtils.insertIntToByteArray(mSendData, 5, 0);
	}

	@Override
	public String type() {
		return "NotYourKing";
	}

}
